//
//  DetailTableViewCell.m
//  LoveListen
//
//  Created by 王喆 on 15/7/2.
//  Copyright (c) 2015年 王喆. All rights reserved.
//

#import "DetailTableViewCell.h"
#import "UIImageView+WebCache.h"

@implementation DetailTableViewCell

- (void)awakeFromNib {
    // Initialization code
}
-(void)showDataWithModel:(DetailModel *)model indexPath:(NSIndexPath *)indexPath{
    self.titleLabel.text = model.title;
    self.titleLabel.numberOfLines = 0;
    self.playtimesLabel.text  = [NSString stringWithFormat:@"%@",model.playtimes];
    [self.ImageView sd_setImageWithURL:[NSURL URLWithString:model.coverSmall] placeholderImage:[UIImage imageNamed:@"medium_head_male_default"]];
    double num = model.duration.doubleValue;
    int min = num/60;
    int s = num- min*60;
    
    
    
    self.durationLabel.text = [NSString stringWithFormat:@"%02d : %02d",min,s];
    
    
    
}




- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
